﻿using ManagementApi.Models.Manage.ProjectGroupMember;
using ManagementApi.Mvc;
using System.ComponentModel.DataAnnotations;

namespace ManagementApi.Models.Person
{
    /// <summary>
    /// 班组人员信息表单
    /// </summary>
    public class PersonGroupMemberEditForm
    {
        /// <summary>
        /// 人员信息
        /// </summary>
        public PersonEditForm Person { get; set; }
        /// <summary>
        /// 班组信息
        /// </summary>
        public ProjectGroupMemberEditForm Member { get; set; }

        /// <summary>
        /// 人员工资卡
        /// </summary>
        public BankEditForm Bank { get; set; }

        /// <summary>
        /// 证书
        /// </summary>
        public IEnumerable<PersonCertificateForm>? certificates { get; set; }
    }

    public class BankEditForm {
        /// <summary>
        /// 发放工资银行卡号
        ///</summary>
        [Display(Name = "发放工资银行卡号")]
        [RegularExpression(RegxPatterns.BankNo, ErrorMessage = "银行卡号只能为16-19位数字")]
        public string? CardNo { get; set; }

        /// <summary>
        /// 发放工资银行名称
        ///</summary>
        [Display(Name = "发放工资银行名称")]
        public string? BankName { get; set; }

    }
}
